﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WinBot.EventsForm
{
    public partial class Form_MousePressed : Form
    {
        public static WinEvent ev;
        public Form_MousePressed()
        {
            InitializeComponent();
            comboBox1.SelectedIndex = 0;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            ev = new WinEvent(new MouseEventArgs((System.Windows.Forms.MouseButtons) Enum.Parse(typeof(System.Windows.Forms.MouseButtons), comboBox1.SelectedItem.ToString()), 
                1, (int)numericUpDown1.Value, (int)numericUpDown2.Value, 0), 0, WinEvent.ArgsEventType.Pressed);
            FormClose(null, new EventArgs());
            this.Close(); 
        }

        public static event EventHandler FormClose = delegate { };
    }
}
